﻿using EFModel;
using IServices;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Y2.Filters;

namespace Y2.Controllers
{
    [LoginFilter]
    public class engage_major_releaseToController : Controller
    {
        private readonly Iengage_major_release he;

        public engage_major_releaseToController(Iengage_major_release he)
        {
            this.he = he;
        }

        public IActionResult engage_major_releaseTo()
        {
            return View();
        }
        //职位发布表查询
        public async Task<IActionResult> Quer(int currentPage, int pageSize)
        {
            return Content(JsonConvert.SerializeObject(await he.Quer(currentPage, pageSize)));
        }
        //职位发布表修改
        public async Task<int> Update(engage_major_release release)
        {
            return await he.Update(release);
        }
        //职位发布表删除
        public async Task<int> Delt(engage_major_release release)
        {
            return await he.Delt(release);
        }
    }
}
